/* See LICENSE for copyright and terms of use */

import org.evtmng.tween.Tween;
import org.evtmng.timeline.TimelineManager;
import org.as2lib.env.event.broadcaster.EventInfo;

/**
 * <p>Contains information on the current event.</p>
 *
 * @author Tay Ray Chuan
 */

class org.evtmng.events.TweenEventInfo implements EventInfo {
	private var m_name:String;
	private var m_tween:Tween;
	private var m_time:Number;
	private var m_tlm:TimelineManager;

	public function TweenEventInfo(name:String, tween:Tween, time:Number, tlm:TimelineManager) {
		m_name = name;
		m_tween = tween;
		m_time = time-m_tween.start();
		m_tlm = tlm;
	}

	public function timelineManager():TimelineManager {
		return m_tlm;
	}

	public function getName(Void):String {
		return m_name;
	}

	public function time():Number {
		return m_time;
	}

	public function tween():Tween {
		return m_tween;
	}

	public function toString():String {
		return "TweenEventInfo("+m_name+": start="+m_tween.start()+" end="+m_tween.end()+")";
	}

}